Conventionally, in race games, technologies are known in which game operations (driving operation) performed by a beginner player unskilled in game operations, especially, an accelerator operation and a brake operation each corresponding to a speed operation input, are automatically corrected to assist the driving operation.
For example, when a beginner's own vehicle turns a corner, the beginner tends to be concentrated on steering operation, and thus, become less concentrated on an accelerator operation or a brake operation. Thus, from this point of view, in the technologies as described above, the operation regarding the braking amount is corrected in such a manner as to prevent overspeed, whereby the speed of the own vehicle is corrected. However, such a technique of directly controlling the speed could allow the player to notice that the correction control has been performed. That is, the technique could give the player an uncomfortable feeling.
Therefore, an object of this exemplary embodiment is to provide a computer-readable non-transitory storage medium having stored therein a game program and the like that allow, while giving less uncomfortable feeling, even a beginner player to cause his/her own vehicle to travel along a course well, thereby allowing the player to enjoy the race game.
In order to achieve the above object, the following configuration examples are conceivable, for example.
One example of a configuration example is a computer-readable non-transitory storage medium having stored therein a game program to be executed by a computer of a game apparatus configured to perform game processing of moving, on the basis of an operation performed by a player, a predetermined object in a predetermined course in a virtual space, the game program causing the computer to perform: obtaining an input amount; performing correction control; and controlling movement of the predetermined object. In the obtaining of the input amount, an input amount according to an input for controlling a moving direction of the predetermined object based on the operation performed by the player is obtained. In the performing of the correction control, correction control of the input amount according to the input for controlling the moving direction is performed, so as to cause the moving direction of the predetermined object to be close to a direction along a travelling direction which is a direction toward a destination in the predetermined course, by increasing/decreasing a predetermined correction value which is added to the input amount, on the basis of relationship between a current moving direction of the predetermined object and the travelling direction of the course. In the controlling of the movement of the predetermined object, movement of the predetermined object in the virtual space is controlled on the basis of the corrected input amount according to the input for controlling the moving direction.
According to the above configuration example, in a race game, for example, even in a case of a player who is not good at a race game, it is possible to support steering operation by the player (input for controlling the moving direction), without giving the player an uncomfortable feeling, thereby being able to enhance the interest of the game.
As another configuration example, the game program may further cause the computer to perform obtaining edge data indicative of positions of both edges in a width direction axis of the course. In the performing of the correction control, the travelling direction of the course may be calculated on the basis of the edge data, and the correction value may be determined on the basis of relationship between the calculated travelling direction and the current moving direction of the predetermined object.
According to the above configuration example, correction based on the position of the edge of the course and the travelling direction of the course can be performed. For example, when off-course is likely to occur, strong correction is performed, whereby occurrence of the off-course can be prevented. When off-course is not likely to occur, weak correction that would not give the player an uncomfortable feeling is performed, whereby interest of the game can be enhanced.
As another configuration example, the game program may further cause the computer to perform obtaining, from a predetermined storage, path data including a plurality of pieces of information of paths each corresponding to a portion of the course and indicating that a corresponding path is a place capable of being traveled through, and width data indicative of a width of a traveling-allowed passage formed on the basis of the plurality of paths. In the obtaining of the edge data, the edge data may be obtained by calculating, on the basis of the path data and the width data, a position of an edge in the course in a predetermined range based on a position of the predetermined object used as a reference. The course may have a route that is branched in a middle portion thereof, the path data may include information of a branched path which is a path corresponding to a position on the course serving as a branch point. The game program may further cause the computer to perform selecting, when the predetermined object is present at the position on the course corresponding to the branched paths, one of the plurality of paths at a travelling direction side for the object, on the basis of the moving direction of the object at that time. In the obtaining of the edge data, the position of the edge may be calculated on the basis of the selected path. Further, at least a part of the route that is branched may be a route that becomes capable of being traveled through in a state where the predetermined object satisfies a predetermined condition. For example, only in a state where the predetermined object possesses a predetermined item, the branched route may emerge.
According to the above configuration example, for example, the configuration of the course in the surroundings of the player object can be ascertained in real time. Accordingly, for example, flexibly processing can be performed assuming a case where a hidden route suddenly emerges, etc., and a variety of gimmicks can be set depending on the race course, and thus, interest of the game can be enhanced.
As another configuration example, in the performing of the correction control, the correction value may be determined on the basis of a distance between the predetermined object and an edge, of both edges in the width direction axis of the course, that is nearer to the predetermined object. In the performing of the correction control, the correction value may be determined on the basis of an angle between the moving direction of the predetermined object and the travelling direction at an edge, of both edges in the width direction axis of the course, that is nearer to the predetermined object. In the performing of the correction control, the correction value may be determined on the basis of the input for controlling the moving direction of the predetermined object based on the operation performed by the player (for example, in consideration of a steering operation input), in addition to the relationship between the current moving direction of the predetermined object and the travelling direction. Further, the correction control may be performed when the predetermined object is present in a predetermined range from either one of both edges in a width direction axis of the course.
According to the above configuration example, it is possible to perform: a fine correction process that suits each state of the predetermined object; and a correction process in consideration of the edge of the course, such as performing stronger correction when the risk of off-course is higher, and performing weaker correction when the risk of off-course is lower, for example.
As another configuration example, the game program may further cause the computer to perform further applying, to the predetermined object, an acceleration toward an inner side direction of the course and in a direction perpendicular to the travelling direction according to an edge, of both edges in the width direction axis of the course, that is nearer to the predetermined object. In the controlling of the movement, the movement of the predetermined object may be controlled on the basis of the corrected input amount according to the input for controlling the moving direction and the applied acceleration. In the applying of the acceleration, a magnitude of the acceleration to be applied to the predetermined object may be determined in accordance with a distance between the predetermined object and the edge that is nearer to the predetermined object.
According to the above configuration example, since the movement of the predetermined object is further corrected in addition to the correction of the input amount according to the input for controlling the moving direction, prevention of the off-course, for example, can be effectively performed.
As another configuration example, the game processing may be a game program for a race, and the input for controlling the moving direction of the predetermined object may be an input generated through operation of a steering wheel.
According to the above configuration example, interest of the race game can be further enhanced.
As another configuration example, in the obtaining of the input amount, the input amount according to the input for controlling the moving direction of the predetermined object may be calculated on the basis of a value indicative of a motion made onto a controller, the controller having a motion sensor configured to detect a motion made onto the controller, the value being outputted from the controller.
According to the above configuration example, by moving the controller, the feeling as if actually operating the steering wheel can be enhanced, for example. At the same time, although the operation to be performed by the player tends to be difficult when the motion and attitude of the controller are used, correction realized by the above-described correction control effectively functions, and thus, interest of the race game can be enhanced.
According to the present embodiment, it is possible to allow, for example, a player who is not good at a race game to cause a predetermined object to travel along the course, while suppressing giving the player an uncomfortable feeling, and thus, it is possible to enhance interest of the game. In particular, while preventing giving such a player an uncomfortable feeling while the player is successfully causing the predetermined object to travel along the course, if a state has established where off-course is likely to occur, for example, stronger correction is performed to prevent occurrence of the off-course, whereby such a state of successful traveling along the course can be made to continue.